<?php 
	$HOST = "localhost";
	$USERNAME = "root";
	$PASSWORD = "";
	$DATABASE = "ltweb";
	
	$cnn = mysql_connect($HOST, $USERNAME, $PASSWORD) or die("Khong ko noi duoc");
	mysql_select_db($DATABASE, $cnn) or die("Loi database khong ket noi duoc");
	// mysql_query("SET NAMES utf8", $cnn);
	$sql="SELECT * FROM setting WHERE id=1";
	$rs=mysql_query($sql);
	if($rs) 
	{
		$row=mysql_fetch_array($rs);
		$TITLE = htmlspecialchars_decode(stripslashes($row['title']));
		$SITEURL = htmlspecialchars_decode(stripslashes($row['url']));
		$VIDEOURL = htmlspecialchars_decode(stripslashes($row['video']));
		$ADDRESS = htmlspecialchars_decode(stripslashes($row['address']));
		$NOTICE = htmlspecialchars_decode(stripslashes($row['notice']));
		$MAILSUPPORT = htmlspecialchars_decode(stripslashes($row['mailsupport']));
		$PHONE = htmlspecialchars_decode(stripslashes($row['phone']));
	}
	else
	{
		$TITLE = $ADDRESS = $NOTICE = $PHONE = 'chưa cập nhật';
		$SITEURL = 'http://google.com';
		$VIDEOURL = 'http://www.youtube.com/watch?v=QH2-TGUlwu4';
		$MAILSUPPORT = 'support@gmail.com';
	}
	// session_start();
	require_once('functions.php');
?>